package com.javasm.springmybatis;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableTransactionManagement
@EnableAsync
@EnableScheduling
//开启事务  ：两个注解  @EnableTransactionManagement + @Transactional
//写法：
//@MapperScan(basePackages = {"com.javasm.springmybatis.mapper","com.javasm.springmybatis.service"})
@MapperScan(basePackages = {"com.javasm.springmybatis.mapper"})
public class SpringMybatisApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringMybatisApplication.class, args);
    }

}
